import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import user from './views/nav1/user.vue'
import echarts from './views/charts/echarts.vue'
import Department from "./views/org/Department";
import Employee from "./views/org/Employee";
import Systemdictionarydetail from "./views/system/Systemdictionarydetail";
import Systemdictionarytype from "./views/system/Systemdictionarytype";
import ShopRegister from "./views/org/ShopRegister";
import Shop from "./views/org/Shop";
import Role from "./views/system/Role";

let routes = [
    {
        path: '/login',  //发送login请求去找login.vue
        component: Login,
        name: '',     //名字
        hidden: true    //隐藏  只需要跳转  不需要显示
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '*', //找不到页面会跳转到404页面
        hidden: true,
        redirect: { path: '/404' }
    },
    {
        path: '/',
        component: Home,
        name: 'Charts',
        iconCls: 'el-icon-s-home',
        leaf: true,//只有一个节点
        children: [
            { path: '/echarts', component: echarts, name: 'echarts' }
        ]
    },
    /*{
        path: '/',
        component: Home,
        name: '组织机构',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/Department', component: Department, name: '部门管理' },
            { path: '/Employee', component: Employee, name: '员工管理' },
            { path: '/Shop', component: Shop, name: '店铺管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/Systemdictionarydetail', component: Systemdictionarydetail, name: '字典明细' },
            { path: '/Systemdictionarytype', component: Systemdictionarytype, name: '字典类型' },
            { path: '/Role', component:Role , name: '角色管理' },
        ]
    },*/
    {
        path: '/shopRegister',
        component: ShopRegister,
        name: '',
        hidden: true
    }
];

export default routes;